how to if domain is such then show such

I need help our pointed in the right direction of something that will
teach me how to have domain names on a server and if domain name is
such then show such part of content on that part or if domain is
something else then show this other content.