Leave it.
Even if it's not what the OP of the question was looking for, the answer can still be useful to people who are looking for something similar. Remember, questions are indexed in search engines and people do search for works that they're looking for, and find the questions here; so if someone is searching for something similar, even if it's not what the OP of the original question was looking for, it could be what this person searching was looking for.
So while you shouldn't provide answers you know from the getgo are incorrect, if you've answered with something that seems to match just leave it, even if the OP says it's not what they're looking for, because it could be what someone else is looking for.