I have output like this:
number pd_team rating att_attorney law_firm patent_developer 496486 Networks Auto
You could start with this...
SELECT number entity , 'pd_team' attribute , pd_team value FROM my_table UNION SELECT number , 'rating' attribute , rating value FROM my_table UNION ...
Deriving the results from this would be trivial