This exact question had been asked and discussed a lot here on SCN.
You might have used a search engine yourself to find those entries before posting the question once again.
And Gregory Misiorek: PIVOT is not part of the SQL standard but had been added by several DBMS vendors in different fashions.
For now, that is up to SPS 9, SAP HANA doesn't provide a PIVOT command on SQL level.
It's possible however, to incorporate this "turn columns to rows" operation in a data flow definition using the Enterprise Information Management (SAP HANA Enterprise Information Management – SAP Help Portal Page) features.
This is not a very dynamic process though as the input and output structure needs to be known upfront.
- Lars