If you have verified that your battery, and power adapter both work properly on another MacBook, then you will need to take in your MacBook for service.
You will find that either the Magsafe connecter (the internal connector where you attach your power adapter), or the battery connector cable (also an internal connector where your battery plugs in) need to be replaced. Take this in to an Apple service shop.