Once it happened: Buddha entered a village. A man asked him as he was entering the village, "Does God exist?" He said, "No, absolutely no."
In the afternoon another man came and he asked, "Does God exist?" And he said, "Yes, absolutely yes."
In the evening a third man came and he asked, "Does God exist?" Buddha closed his eyes and remained utterly silent. The man also closed his eyes. Something transpired in that silence. After a few minutes the man touched Buddha's feet, bowed down, paid his respects and said, "You are the first man who has answered my question."
Now, Buddha's attendant, Ananda, was very much puzzled: "In the morning he said no, in the afternoon he said yes, in the evening he did not answer at all. What is the matter? What is really the truth?"
So when Buddha was going to sleep, Ananda said, "First you answer me; otherwise I will not be able to sleep. You have to be a little more compassionate towards me too. I have been with you the whole day. Those three people don't know about the other answers, but I have heard all the three answers. What about me? I am troubled."
Buddha said, "I was not talking to you at all! You had not asked, I had not answered YOU. The first man who came was a theist, the second man who came was an atheist, the third man who came was an agnostic. My answer had nothing to do with God, my answer had something to do with the questioner. I was answering the questioner; it was absolutely unconcerned with God.
"The person who believes in God, I will say no to him because I want him to drop his idea of God, I want him to be free of his idea of God -- which is borrowed. He has not experienced. If he had experienced he would not have asked me; there would have been no need.
"The person who believed in God, he was trying to find confirmation for his belief from me. I was not going to say yes to him -- I am not going to confirm anybody's belief. I had to say no, I had to deny, just to destroy his belief, because all beliefs are barriers to knowing the truth.” Theist or atheist, all beliefs, Hindu or Christian or Mohammedan, all beliefs are barriers.
Buddha further said "And the person with whom I remained silent was the right inquirer. He had no belief, hence there was no question of destroying anything. I kept silent. That was my message to him: Be silent and know. Don't ask, there is no need to ask. It is not a question which can be answered. It is not an inquiry but a quest, a thirst. Be silent and know.
I had answered him also; through my silence I gave him the message and he immediately followed it -- he also became silent. I closed my eyes, he closed his eyes; I looked in, he looked in, and then something transpired. That's why he was so much overwhelmed, he felt so much gratitude, for the simple reason that I did not give him any intellectual answer. He had not come for any intellectual answer; intellectual answers are available very cheap. He needed something existential -- he needed a taste. I gave him a taste."
Source: I read this on a website, this story was told by Osho.