Not sure where it might be located, but I think its function is to inhibit the starter unless P or N is selected, so it'll be controlled by the gear selector. As for not functioning properly - could be gear selector contacts/wiring or the relay itself
Hi,
What year is the the car? if it has a five speed box (Though i believe all W210's were 5 speed), I believe the inhibit relay is an integral part of the transmission ECU.
What makes you believe that you have problems with the inhibit relay?