I think that having several similar answers is an annoying distraction. I'd have more value from my time (and my patience) if there are 5 answers than if there are 15 posts with only 3 actually different solutions.

If my post has something no other has, I keep it as is. Most text already appears in a previous post, but my answer makes sense if read alone. If there's nothing new, I delete it quickly so I don't clutter the discussion. It means I respect the time of readers and the efforts of contributors.

I'd say leave your answer and upvote the other answers that you think are appropriate, unless it's an exact copy. There is not usually one true way, and other viewpoints help the answer-seeker draw their own conclusion.

I noticed a situation where I provided an answer, then somebody else answered with a less complete answer a few minutes later. Then the other poster edited their answer and copied mine into it, as if it was their own! I watched all this happen as I kept hitting Reload.

Since the other poster's answer was now closer to the top, having been edited more recently, they got the "best answer" checkmark and more upvotes.

(Obviously I have accumulated enough rep points now that this doesn't really bother me, but this sort of thing is bound to happen to others, too.)

I think its right thing to do.
I had once answered a question correcty (without any sample code) and it was accepted by the author and upvoted.
Few minutes later I saw someone else has written a answer with exact code required.
I went back and deleted my answer and upvoted the other person's answer

I have found it to be rare that questions are an EXACT duplicate. (1) Slight differences in the question can lead to very different answers. (2) Because each question draws different posters, I have often found that one version is answered much better than the other. I find this valuable. (3) Quite often, for instance in html or css, new methods have come to light or become popular to solve the same problem, so a CSS3 question answered in 2013 might bring up more relevant answers than the ones to a (for the most part) duplicate question in 2011.

For me, when I get an answer to my question, I'll edit my own question to include the accepted answer below. This helps when there are a few good alternative answers to the same question. I think it'll help in the event there's duplicate answers too.

Addressing all the accepted answers together with the question seems neater to me. An example would be my first question.

Of course, there's the problem of diligence (or the lack of it) on the part of the question author to edit the question in the first place — not everybody does that, unless there's some UI functionality to improve on this suggestion.