It could be a power supply or possibly the power switch or even the motherboard. You can bypass the power switch by finding where the 2 pin wire connects on the motherboard and unplug it. Then take a flathead screwdriver and short the connection. That is make contact with both pins on the motherboard at the same time to start the computer and see if it stays running. If so you most likely have a bad switch on the case.
Next I would try the power supply. They are cheap and easy to replace. If that doesn't work it may be that you have a bad motherboard.