Вы можете выбрать отдельные продукты и cross apply
их в функции, которая вычисляет строку параметров:
select *
from (select distinct product_id from @t) a
cross apply (
select option_name + ', ' as [text()]
from @t b
where a.product_id = b.product_id
for xml path('')
) c ( Options )
-->
product_id Options
17854 XSMALL (2-6), SMALL (6-10), MEDIUM (10-14),
18232 LARGE,
Код для создания примера:
declare @t table (option_name varchar(30), product_id int)
insert @t select 'XSMALL (2-6)', 17854
union all select 'SMALL (6-10)', 17854
union all select 'MEDIUM (10-14)', 17854
union all select 'LARGE', 18232