How do I get:
id Name Value 1 A 4 1 B 8 2 C 9
to
id
If it is SQL Server 2017 or SQL Server Vnext, SQL Azure you can use string_agg as below:
string_agg
select id, string_agg(concat(name, ':', [value]), ', ') from #YourTable group by id