iPhone 5 does not work while charging
The problem is the electrostatic current/charge/grounding while using Charger.

First make sure you do use the original Charger.

If your iPhone is in a leather case, remove it.

If you have a protective case, or if you are using a plastic sheet or film on the display, try removing them and testing the device without it.

Update: 

I missed the point of you having 2 other devices doing the same.

In that case it could be the electric wiring in your place. Try plugging in in a another place (coffee shop). You might have what it is called High Frequency Harmonics (dirty electricity) in you home caused by number of different sources.