So a code is entered by a user and you want to retrieve the option set value that has the code as an attribute?

Get option all values filtered this options code attribute is equal to given code