Is it fair to vote to close question which I have answered? In situation like this how to judge a question?
That's a bit of a personal decision really. I do often see people answering questions they ultimately vote to close. Sometimes explained as "Hey, I don't think it belongs here but at least the OP got an answer". In some way that seems like the kind thing to do.
I don't share this view. When I vote to close something, I won't answer. I might, at most, leave a comment which sort of answers the question. But most often I won't do even that. I don't feel good about gaining reputation while simultaneously saying "This does not belong here". I also feel it sends to wrong message. "Sure, your question does not belong here, but try anyway because you'll most likely get the answer". But that is my personal view and rule.
As such, whether it's fair or not really is up to you to decide.