|You should first check the cable harness ( PSU power cables, ATA/SATA cables, etc. ) for tight fit in the connectors. Then try to reseat RAM modules, gfx card, etc.|
Sometimes, a cable or a component may work loose due to vibrations or an accidental kick.
But your description of the problem suggests that you have a broken cable or loose pin in the CPU power connector or a faulty motherboard. When you apply force on the CPU power connector, you bend things a little making a temporary contact of wires in the motherboard circuit board.