I think that is called Cloaking. A website I went to once to check out our competitors, to see if they were doing just that, was
http://www.1-hit.com/...I don't see that free tool on their anymore, perhaps I'm not looking hard enough. Anyway, if a free tool can scan a website and see it cloaking things, why couldn't a search engine?
If you don't want your users to see it, then it shouldnt' be on their in my opinion.