So from what you're describing it does sound like you need to take your phone to have the power switch repaired or replaced. Hopefully it's just something like the metal contacts inside the switch itself just need to be cleaned or maybe there's something like lint inside. This could be fixed by just using some aerosol contact cleaner. But if it's a matter of the switch needing to be replaced that's a lot more involved.
Since you can still use your phone, before you do take it somewhere now is the time to backup your data. Make sure your mail, contacts, and calendar info are synced with your mail service. back up whatever SMS texting you have, and all the photos, videos, and other files are backed up online and/or to a computer.