DECLARE @pvt TABLE(Present int, [Absent] int);
INSERT INTO @pvt VALUES (10,40);
--Unpivot the table.
SELECT Code, Value
FROM
(SELECT Present, Absent FROM @pvt) p UNPIVOT
(Value FOR Code IN (Present, [Absent]) )AS unpvt;