Well created a table with 4 fields
ID - BigInt
BitOne - BigInt
BitTwo - BigInt
BitThree - BigInt
Sample data
1 1 NULL 1 >>> Output '1,NULL,1'
2 1 NULL NULL >>> Output '1,NULL,NULL'
3 NULL 1 NULL >>> Output 'NULL,1,NULL'
4 NULL 1 1 >>> Output 'NULL,1,1'
5 1 1 1 >>> Output '1,1,1'
QUERY >>>>>
SELECT
CONVERT(nvarchar,(CASE
WHEN t.BitOne IS NOT NULL THEN CONVERT(varchar,t.BitOne)
ELSE 'NULL'
END) + ',' +
(CASE
WHEN t.BitTwo IS NOT NULL THEN CONVERT(varchar,t.BitTwo)
ELSE 'NULL'
END) + ',' +
(CASE
WHEN t.BitThree IS NOT NULL THEN CONVERT(varchar, t.BitThree)
ELSE 'NULL'
END)) AS RESULTSTRING from TestTable1 t WHERE t.ID = @ID
You can replace 'NULL' with '' to make empty string there or can put any string
Hope that helps
Regards, J'Sinh