Usually when I post an answer as a comment, it's due to one of these reasons:
I'm not 100% sure if it's correct, but I want to throw it out there.
I don't have the time to develop a complete answer but felt it could help someone else develop one or help the OP find the answer.
I believe the question should be closed because it's off-topic, too localized, or possibly a duplicate, and adding additional answers is not useful.
I don't realize at the time that the comment could be an answer (usually on meta).
The thing you need to look out for is #3. If it's not going to be helpful to future visitors, then yes, close it. It needs to be gotten rid of.
If the answer in the comments is helpful, you have a few choices to make it into a real answer:
@notify the person who commented and request they post it as an answer. This will also notify the OP and they may possibly post their own solution, if they have solved it.
Post the comment as a community wiki answer, giving credit to that person and not gaining reputation from their work.
Improve the answer to give more detail and post your own answer. This is a more viable solution as an answer in the comments is very likely to be incomplete or lacking in detail due to the nature of comments, and the limit in characters.