When using melee basic attacks, most weapons are about the same.
Axe, +2, 1d12
Sword, +3, 1d10 damage
From what I've read, it's generally assumed by the designers that PCs hit about 60% of the time. If we assume that the Waraxe hits on 10 on a d20 (55%), and the Bastard Sword hits on 9 (60%), the average damage looks like this:
Waraxe: ((1x12)+(10x6.5)+(9x0))/20 = 3.85 damage per attack on average.
Bastard Sword: ((1x10)+(11x5.5)+(8x0))/20 = 3.525 damage per attack on average.
Against lower AC targets, the axe tends to be better. Against high AC targets, the sword tends to be better.
If there is some kind of special benefit applied to hitting, the calculation changes totally. Rogues with daggers are using only a d4 weapon, but that doesn't matter because it's just a method of delivering bonus damage dice. For a ranger with the Hunter's Quarry, I'd go with the sword.