Slavery, almost always.
The only exception would be when you're running a well developed specialist economy, but for some reason don't have the improvements necessary to hire the specialists you want.
The big problem to me with caste system is that it doesn't allow you the specialists you'd want most, engineers.