>I think this solution is as pretty as it gets and you don't find anything better.
>
Whether PIVOT or CASE is prettier/cleaner - that's subjective and everyone can decide for themselves. (Some lengthy debates on the MSDN forums for years and I know you were part of the discussions)
My personal opinion is that I'd rather read a PIVOT statement than a CASE statement, especially for a long query. The long case statements can get a bit cluttered, but I realize many experienced SQL people don't like PIVOT. Just my 2 cents.
It would be nice if there was a more elegant solution but I doubt you'll ever see that covered in an ANSI SQL standard. (Yes, someone could use dynamic SQL for a long list like this one).
But on the "better" - while SQL will usually generate identical execution plans, I would argue that the PIVOT is, more often, a bit more efficient on the total elapsed time from IO statistics (certainly not by a significant amount)