A capacitor is like a battery.

This is like saying a compressed air tank is like an air compressor. A compressed air tank will lose pressure quickly as you use the air stored inside it. An air compressor will supply air at a steady pressure as long as you supply power. A charged capacitor will act like the compressed air tank. As you use it the voltage will drop rapidly. A battery has a large energy store in its chemical makeup and will supply a steady voltage many, many times longer. EDLCs are nearly an exception. They have such large capacities that they rival batteries in energy density in some applications.