In some cases it can be the sensor that detects when the vehicle is in PARK or NEUTRAL that is defective (inhibitor switch ba tawag dito?).

But if you can hear the solenoid, it means the switch is working is electricity is flowing to the starter...