The Greatsword is a better weapon than the Greataxe unless you are playing a Barbarian.
The Greatsword has two big benefits: (1) it has a higher average, and (2) it has a tighter and less random distribution. For classes that can take Great Weapon Fighting, it has an additional edge in the dice re-roll mechanics since each die can be re-rolled on a 1 or a 2.
The second of these points is often misunderstood. It is common for people to wrongly believe that the randomness "balances out" so that it's simply a matter of taste whether you prefer. This is wrong. Randomness counts against the player in the long run and, unlike monsters who appear, die and are never seen again, players are around long enough for the long run to count. The reason for this is simple: low rolls count against you more than high rolls count for you. HPs done in damage over a monsters' hitpoint total are wasted while a blow that fails to fall a monster means they stand for another hit, maybe round.
Consider this graph, showing the distribution of frequencies of number of hits required to kill a 20hp monster with a greataxe or greatsword:
The greataxe has a slightly increased chance to kill in 2 hits, but a much reduced chance to kill in 3 hits and a longer tail of 5 or more hits. That increased chance of requiring many more hits hurts you much more than the increased chance of killing in 2. And, lest you think this is restricted to this one example, consider this graph of mean hits to kill across a range of hitpoint totals (shown with +3 to damage but the effect is similar at all adds) and notice that the Greataxe lags at every hitpoint total shown:
So, in summary, the Greatsword is simply a better weapon. There is no reasonable trade off to be have with high risk, high reward. The Greataxe is just worse. It is only if you have Barbarian-style abilities that boost the Greataxe more than the Sword that it is a better choice.