Caterpillar of Helicoverpa armigera: Tobacco Budworm
seem to be able to eat any green leaves.
In the current 100 million year war between plants and caterpillars, in general each plant family has evolved a set of different poisons to kill caterpillars that try eating the leaves of plants in that family, and each caterpillar family has evolved a different set of metabolic mechanisms for coping with the particular poisons of one or more plant families.
The caterpillars in some Lepidoptera families, like Noctuidae, have managed to evolve metabolisms that cope with a wide variety of plant poisons, and seem to be able to eat any green leaves put in front of them.
Other caterpillar species can only safely eat young leaves, some old leaves, and some dead leaves, of plants from one plant family, or one plant genus, or some only one plant species. Some caterpillars when young can only eat young leaves, and when near maturiy, can only eat mature leaves. So: the leaves you can safely offer a caterpillar depend on the species of that caterpillar, and what instar it is.
If you know what plant families a particular caterpillar feeds on, then if you run out of leaves of one plant species in those families, it will often be ok to offer it leaves from another plant in those families, and safer still to use a plant in the same family as the one that ran out, and safer still to use use leaves from a plant of the same species that it was eating before.
But sometimes, even this fails as plants vary in the the poison content of their leaves depending on their local growing conditions. For example caterpillars of Graphium sarpedon will thrive on leaves of Camphor Laurel from Sydney, but die if feeding on leaves of Camphor Laurel from Lismore.
Rosaceae plants seem to have the fewest poisons, so that is why Rose Petals and Apple slices are often good replacement for foliage.
But there is no general answer to your question.
(updated 20 September 2009, 8 September 2014)