If you are talking about a user selecting their own answer on *any* question, then you probably have a permissions issue. Go to Admin/Permissions and look at the option "Selecting answer for any question".
But assuming you're talking about a user asking a question, answering their own question and selecting it as the best answer - that's just how the system works. If I ask a question but then I found the answer myself, I should be able to answer.
However, it may be possible to prevent that by writing your own plugin. Try an event plugin and check for the "a_select" event. If the question user and answer user are the same, unselect it.