That depends on the author of the question (for answer acceptance) or the persons looking at the answers for help, and other factors, of which would make a many page article or blog post, and ultimately cannot be ordered in any sane sense that would make sense to other users.
Take into account number of upvotes and number of downvotes (not always visible because of rep requirements), on this prime example where an accepted question is not actually working but my answer is. The accepted answer had 27 upvotes and 5 downvotes. My answer has the +500 bounty and 82 upvotes with 0 downvotes. The key point here is that my answer came in long after the accepted answer was accepted. The issue in this case was that the accepted answer 'no longer worked' but my answer which I pulled from the 'net did work and was extremely thorough (to this day it still works). That would make my answer valid and the accepted answer invalid, but since none of us are the question author we can't change the accepted question.
Let's take another prime example, on this question. In this case, let's assume that this is before my answer was accepted, and it's just my answer and someone else's answer.
The other answer on here does a decent job of a short and concise explanation of what's being asked. Then I come along, the maintainer of the
nginx package in ubuntu, and make a long post about the answers. My answer was accepted because i'm the authoritative resource for
nginx package/flavor questions in ubuntu - there is no higher authority as I'm the one doing the package maintenance. So, accepted or not, my answer could techincally be considered the answer because it comes from the highest authority.
Normally, though, we're going to have the case of it being "Which answer works for me" vs. accepted, number of votes, bounty, etc. So it varies greatly from answer to answer, and it can't really be answered succinctly here.