Earth& neutral voltage detection
Firstly make sure you understand exactly what you are trying to sense and why.
This Megger document may help you.

Earth and Neutral would normally be bonded at the mains distribution box (power entry) on a building. At this point there obviously should never be a potential difference between Neutral and Earth wires.
Further into the building the N-E potential WILL vary because Neutral carries a current for all loads, and Earth does not.
It's common practice to test the N-E voltage in hospitals, where grounding a patient could be deadly. For this reason medical equipment AC wiring is locally bonded to reduce risk. 

Your idea to produce a monitor that triggers a relay trip coil may not be a great idea, unless the unit is separately battery powered (a poor idea in general).
You need to write some specs for what you want to do.

Ask yourself some questions about your functionality: 


What are you protecting against?
Is this transient or permanent protection?
What values represent a trip point? (3V is already a dangerous difference if humans are involved)
How will the system be reset after a detection/fault?