You'll just need multiple filters on your data source when you populate your fields.
When you create your rule, you set a field's value and select your target field. Then, in the formula editor, you select Insert Field or Group and select your source field (that has the data you want in your main data source). When you select that field, you can choose to filter the data.
You'll need two conditions in your filter, with an "and" -- basically saying FieldA in the main data source is equal to the field in the secondary data source that its value is from and FieldB in the main data source is equal to the field in the secondary data source that its value is from.... While this article is about filtering in the drop down data source itself, it does describe using multiple filters, and may be helpful.