Just wondering. I was thinking if you vote to close you're saying the question is not answerable/should not be answered which is in direct contradiction of answering it. Is there a counterexample?
Almost never. Think of how it looks: when you vote to close the question, you kind of put a clock on when the question can really be answered as an answer (not as a comment). Although you can't quite predict when the window of time will close, you have some idea, such as if yours is the very first close vote. If you squeak your answer in, you could potentially get upvotes on it (though you also expose yourself to downvotes, of course).
I can think of one somewhat plausible scenario in which it would make sense to vote to close and to answer: someone else answers the question but their answer is subtly wrong. What I would do in this hypothetical, is answer the question but mark it Community Wiki. I won't get any upvote points, but hopefully I shield myself from the downvotes.
EDIT: To clarify, the hypothetical I was thinking about is that first you vote to close and then someone posts the subtly wrong answer.
The principle "do not deny to others the resource that you have just used" should apply. If you answered a question, either refrain from casting close votes on the question, or delete your answer in case of casting those votes.
If the question is a duplicate of Q, actions that address the duplication but do not combine answering and close-voting include:
- close vote, delete the answer and (possibly) repost answer under Q
- keep the answer, post a comment with link to Q under the question, but do not close-vote
- flag the question to request merger with Q, for example if there are multiple answers.
If the close reason is some event that occurs after the answer, any justification for keeping one's answer posted is also a reason for allowing others to answer the question. Rollbacks, edits, comments and flags are available for addressing any perceived problems with the question, without the need for a close vote (by an answer poster).
That is for the main site. For the meta site, answering and close-voting (without deleting the answer) can be particularly abusive since it expresses an opinion while attempting to deny that option to others.
Added. As far as the ethics, philosophy and social norms are concerned, there was a nice elaboration of the basic principle by user @quid in 2013 that is worth quoting here:
"I think it should be community norm that one can either answer or vote to close but not both.
The reason for this is quite simply that it feels inappropriate to me to use for oneself an option (answering the question) and at the same time to do something the main or essentially sole purpose is to take this option away for everybody (else).
...as a general principle the above should be the community-norm, in my opinion. (On main and on meta.) ...
If in some specific case somebody feels the need to deviate from this general principle, it would feel appropriate to me they provide in each such case at least a somewhat detailed justifcation for doing this. " -- ["quid", 17 August 2013]