There are several references in scripttures that caste was like an office or designation that was to be conferred on the basis of karma. There are examples that a person born in one caste could become other caste by his conduct. Here is one of the references from Vishnu Puran . Interested friends may kindly clik here and listen to track 75 of the link.