PivotTable
SELECT InvoiceNo,isnull([1],'')+','+isnull([2],'')+','+isnull([3],'')+','+isnull([4],'') ActionType
FROM
(
SELECT InvoiceNo,cast(SendType as varchar) ActionType
from dbo.PrintShareEmail SI with (nolock)
where 1=1
--AND UserID=@userid
AND (@type=0 OR SendType=@type )
) g
PIVOT
(
min(ActionType)
FOR ActionType IN ([1], [2], [3], [4])
) AS PivotTable