While you're interested in the "general norm", there isn't one. The act of answering and voting to close (vtc) are not necessarily inconsistent. It depends on the underlying reasons for those acts. If you answer or vtc in "good faith", it's not a problem. But it is a problem if you do either in "bad faith" (with harmful intent or outcome).
Some answers shouldn't be posted in the first place.
- Answers that are really comments.
- "Answers" that rebuke the question or others.
- Answers that are trolling.
- Duplicate answers.
In your case, it appears you wrote the answer with the intent to be helpful, as you understood the question at the time. Later, you decided to vtc because the question was opinion based.
Should you delete your answer? That's up to you. Depending on the situation, sometimes I delete my answers. Other times I don't.
- If the question ultimately remains open, consider leaving your answer. If the question is eventually closed, consider deleting your answer.
If you still believe your answer to be helpful, consider leaving it.
If your answer voices an "opinion" not otherwise expressed by others, consider leaving it. But if you're just echoing what others are already saying, what's the point?
- If someone downvotes your answer, indicating someone thinks it's not helpful, consider deleting (or revising) it.
Should you retract your vtc? I would not. But, again, up to you.
- Is the reason for your vote still applicable? Is the question still opinion-based?
- If you hadn't written an answer, would you still consider retracting your vote?
- Do you think it's beneficial for the question to stay open?
Should you comment to explain your actions? As before, it's up to you. I would make the decision on each independently of the other as I would for any other question or answer.
- Few, other than you, are likely to care whether your actions, in and of themselves, are consistent. What they're more likely to be concerned about is how it affects them and what they can do about it. To that extent, you should comment. But if commenting is just an act of undoing to relieve some dissonance, you're better off with Holy Water because it would avoid involving others in your personal predicament.
Sometimes, I believe a question should be closed, but also think the OP should receive some type of response. In those cases, I might leave an answer in the comments. Although the policy is to post answers as answers, it hasn't been a problem for me with questions that are clearly pending closure. Often such questions are unclear, so a partial answer can be left along with a question for clarification.
Some topics, such as related to ethics and morality, are inherently opinion-based, but have an objective aspect to them. Opinions can be categorized into multiple groups for comparison. It may be appropriate to leave such questions open, despite being opinion based, and to write an answer analyzing the response categories.
To illustrate "bad faith":
On a site where I have low reputation, I wrote an answer that directly answered a question in a manner that was intended to be helpful. Someone with high reputation downvoted my answer, wrote disparaging comments, and wrote a troll answer. When I called out the hypocrisy, the user commented that the question was of poor quality, the question was going to be closed, and he didn't want my answer to be the only one after it closed. Shortly after, the question closed and a mod deleted the question. Apparently that's how that site operates. Regardless, none of that was warranted. That user knew the vtc count and the standard procedure on that site. If he had done nothing, the question and answers would have been deleted silently.
Some users copy/paste old answers to new questions without editing to address the new question. They are basically acquiring multiple upvotes for the same answer. If they truly believe the exact same answer applies to the question, they should vote to close as a duplicate. If they believe the question is not a duplicate, they should edit their answer accordingly.