
how to convert like this row into column

how to convert like this row into column
try this
select model_cod, ver_num,
sum(case when mod_cls in ('KM', 'KS') then cost else 0 end) as [KM/KS],
sum(case when mod_cls ='PL' then cost else 0 end) as PL,
sum(case when mod_cls ='PI' then cost else 0 end) as PI,
sum(case when mod_cls in ('KM', 'KS', 'PL', 'PI') then cost else 0 end) as Total
from yourtable
group by model_cod, ver_num