select name,
sum(case when `type` = 'Cash' then `value` else 0 end) as Cash,
sum(case when `type` = 'Card' then `value` else 0 end) as Card
from your_table
group by name
select name,
sum(case when `type` = 'Cash' then `value` else 0 end) as Cash,
sum(case when `type` = 'Card' then `value` else 0 end) as Card
from your_table
group by name