I accidentally flagged an answer with the wrong reason -
not an answer instead of
Is it possible to change it after I flagged it? Does it matter a lot?
You can retract a flag, but you won't be able to put a new flag on the same post.
From Meta Stack Exchange:
To retract a flag, click the
flaglink again and the button should become
Retract Flag. [...] You...cannot retract an active flag for moderator attention if the post has been deleted and you don't have enough rep to see deleted posts.
It doesn't much matter for a single post. People who handle the flags will certainly note the incorrect flag and flag it themselves with the "correct" flag. If you regularly mis-use flags, the Moderators may have a word with you.