Micro-controller - Detect If AC Device Plugged In / Drawing Current from a Relay
In both case 1 and 2 there's no current, and there's no electronic way to distinguish between the two on the socket side. You would need an electromechanical way to detect the presence of the plug in the socket, read: a switch in the socket, though I'm not aware of sockets which have this feature.  

To distinguish between 2 and 3 you could use a current transformer or a current sense resistor. The former has the advantage that you have a galvanic separation; you don't want your microcontroller in direct contact with the AC mains voltage. The current in the transformer's secondary winding will generate a voltage across a load resistor if there's current through the primary. The resistor's value will depend on the mains current you want to detect and the transformer's winding ratio.