Paying state taxes for IRA distributions

My IRA has incurred capital gains from several states for many years.  Now that I've started to take distributions from the IRA, how do I allocate and pay the various states capital gains that have accumulated over many years?