actually sounds more like an unpivot to normalize a data structure.
http://msdn.microsoft.com/en-us/library/ms177410(v=sql.105).aspx at the very bottom is the unpivot
EDIT Forgot url tags
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]