How to get one row out of many rows with same column id
You can return a comma separated list of values by using the string_agg function.

https://docs.microsoft.com/en-us/sql/t-sql/functions/string-agg-transact-sql?view=sql-server-ver15