In Ubuntu you can setup different network connections with different DNS servers and be able to switch from network top menu,
1. Simply add a new network connection (may need two, one for Ethernet and one for WiFi)
2. Configure DNS settings
3. Switch to new connection from top menu
4. Test with nslookup command