Only if it has beed unanswered/unresolved for a while, and you figure it out yourself.
For example, if Ayan figures out the answer to his long-unanswered question, answering and selecting it would be more than appropriate.
If you ask a question and then answer it yourself right after would be considered points-grubby and would probably be downvoted/flagged.
However. Selecting you own answer does not give you the 20 points for getting a best answer, only the 2 points from selecting one.