assuming value is numeric
select id,
sum(case when type = 'type1' then value else 0) as type1,
sum(case when type = 'type2' then value else 0) as type2
group by id
order by id
if it is not numeric replace sum with max, matter in this zero with the empty value equivelant for that data type.