Is the search parameter on the channel entries tag what you are looking for? It lets you specify to only retrieve channel entries in which a custom field matches a certain value.
https://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_entries.html#search-field-name
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.