select a, sum(decode(b, 1, c, 0)), sum(decode(b, 2, c, 0)), sum(decode(b, 3, c, 0)), sum(decode(b, 4, c, 0)) 
from (你原先的查询语句)
group by a;