We can use the PIVOT relational operator to change a table-valued expression into another table.
select * from
(select
date ,[name],
case
when attendance =0 then 'Absent'
else 'Present' end attendance
from ABC)p PIVOT
(
max( attendance)
FOR date IN
( [1/1/2009], [2/1/2009], [3/1/2009],[4/1/2009],[5/1/2009],[6/1/2009] )
) AS pvt