select distinct 年,[季度1]=(select 金额 from tablename where 年=a.年 and 季度=1)
,[季度2]=(select 金额 from tablename where 年=a.年 and 季度=2)
,[季度3]=(select 金额 from tablename where 年=a.年 and 季度=3)
,[季度4]=(select 金额 from tablename where 年=a.年 and 季度=4)
from tablename a