SELECT (SELECT ac.ColName+',' FROM T1 AS ac FOR XML PATH('')) AS ColName, (SELECT ac.colTitle+',' FROM T1 AS ac FOR XML PATH('')) AS colTitle