select
*
from
(
UserName,Subject,Source
TestTable) testpivot(
sum
(Source)
for
Subject
in
(语文,数学,英语)
) pvt