This is certainly an interesting challenge. I just wrote a blog on different ways to pivot data for Tableau, including custom SQL. You can take a look at it here: 3 Ways to Pivot Data for Tableau - Ken Flerlage: Analytics Architecture, Strategy, & Visualization
But I'm still not sure this addresses your needs because it requires you to know the columns ahead of time. What is the source of the data? Is it really structured in the source table this way? I'd be surprised to see that because it would mean that a database developer would need to change the structure of the table every month. My guess is that there is some source data somewhere that has the data in rows instead of columns.
Thanks a lot for the quick answer:-) The blog post is indeed quite good. The data is taken from an excel sheet and they simply add a new field each month.
That'll be tricky. I'd recommend seeing if you can go back to the original source data instead of using the Excel report they are updating each month.