SELECT id,
(
SELECT text AS [text()]
FROM mytable mi
WHERE mi.id = md.id
ORDER BY
mi.col
FOR XML PATH(''), TYPE
).value('/', 'NVARCHAR(MAX)')
FROM (
SELECT DISTINCT id
FROM mytable
) md