There are a lot of code example out there that helps users do this. Eg: https://stackoverflow.com/questions/12693729/how-to-display-google-adsense-ads-to-search-engine-traffic-only
But I was looking authoritative links or answers, since there is no answer in Adsense TOS.