Schooling choice during structural transformation