You need to build out a dynamic query and you'll also need to loop through the scope records so you can run the query and get the IDs for them all.
// Set for storing found ids
Set<string> ids = new set<string>();
//Loop through scope
for(sObject s:scope){
// Set variables
String objectname = s.Objects__c;
String fieldname = s.Fields__c;
String targetvalue = s.Field_Value__c;
// Build query
String query = 'SELECT Id FROM' + objectname + 'WHERE' + fieldname + '= : ' + targetvalue;
// Loop through query and add Ids to set
for(sObject sob:Database.query(query)){
Ids.add((String) sob.get(id));
}
Then you attachment query should yield some results.
Might need some tweaking on phone