Try:
select
Agent,
max(case when `desc` = 'Total' then ColValue else 0 end) Total,
max(case when `desc` = 'Replaced' then ColValue else 0 end) Replaced
from tbl
group by Agent
Demo sqlfiddle
1
solved T-SQL | SQL-Server Pivot [closed]