You can rotate text inside a <latex> tag, and tables support this. Here is an example:
@startuml
title
| |<latex>\rotatebox{90}{heading1}</latex>|<latex>\rotatebox{270}{heading2}</latex>|<latex>\rotatebox{45}{heading3}</latex>|
|<latex>test</latex>| test2 | test3 | test4 |
end title
@enduml