Rotate[Grid[
Reverse /@
Transpose@
Map[Replace[{SpanFromLeft -> SpanFromAbove,
SpanFromAbove -> SpanFromLeft, SpanFromBoth -> SpanFromBoth,
i_ :> Rotate[i, -90 °]}], #, {2}] &@{
{1, SpanFromLeft, SpanFromAbove},
{3, SpanFromLeft, SpanFromAbove},
{4, 5, Pane@Style["A\n\n\nB"]},
{6, 7, 8}
},
Frame -> All, Alignment -> {Right, Center},
ItemSize -> {{Automatic, Automatic, 3, Automatic}, Automatic}],
90 °
]