Pichkeopiseth-
The iPad 2 has been out less than a year, so it is still under warranty. Apple should repair or replace. Whether they replace with a new or reconditioned unit, I can't say.
For an out-of-warranty unit, an Apple Authorized Repair Center may be your best bet, since it is probably an easy repair.
I suggest you verify that the problem exists in at least two Apps. One I use is the free Skype App. Skype has a test server you can call, that will record and play back your voice.
If the microphone works sometimes but not others, try resetting (rebooting) the iPad. Hold both the Home and Sleep buttons for several seconds until the Apple logo appears. Ignore the "Slide to power off" arrow. The iPad will restart after a couple of minutes. Resetting this way will not hurt anything, and sometimes clears up mysterious problems.
Fred