I have tried many time to bake a cake using pressure cooker,but every time it was not baked properly sometime it became very hard and sometime it will not baked overall,i am not getting that how to bake a cake properly using pressure cooker?
You should pre-heat the cooker for 10 to 15 minutes and not use the rubber of cooker while baking the cake. Place your cake on some sort of steel ring or on another pot so it will not be directly heat from bottom and bake your cake on low flame for 20 to 25 minutes.It will perfectly baked.
I also bake the cake using cooker for several time and it's perfectly baked.
Baking implies the use of an oven, and a cake is almost always baked. Maybe you need to revise your ambitions according to your equipment? Pressure cooking only works for wet ingredients, and microwaving any sort of flour-based baked goods is asked to turn them into rubber, even if just reheating.
You probably can't bake a good quality, fluffy etc. cake using a pressure cooker.
Cooking cake in a pressure cooker isn't really that great of a way to make cake, usually the pressure forces the cake to become dense and very solid. Most cake (not all: dense cakes like pound cake may work) are going to be nearly impossible to replicate "properly" in that environment.
In regards to microwaving cake, that's also not a good way to make most cakes, typically cakes come out spongy and very resistant in microwave but at least they are still much more fluffy than a pressure cooker's.
You could try: Steaming or making a mini oven out of foil etc. would be best for a cake if you can't use an oven.