It depends of what you want to do, both moves are important and equally effetive at the hands of that Pokemon, but between the two, the one who will do better will depend on what do you want your swampert to do, he has a particular role? He especialize in something or he is just balanced to be average effetive at everything?
If you think of what do you want him to do, you will find the move who better suit that particular role.
for example, for an average/balanced set swampert, the better choice is Hammer arm, because is efetive against some types.
But for example if one of the roles your swampet is taking, is something that require him to have alot HP and to deal with foes who have alot HP and are hard to take down using standarth moves, then the better choice is Endeavor.
Of course this are just examples, because swampert can do too many things to think about.
The best move will be the one who fill (or are essential) to your role or just complete your balanced set.
hope i've helped, have a nice day!