Need help to create query to compare the data and fetch relevant data from table:
Input
| Field1 | Field2 |
|---|---|
| abc_ID | ID |
| abc | abc |
| abc_id_test | test |
| abc_id_test | abc test |
| abc_id_test_scenario | scenario |
| abc_id_test_scenario | cde test |
Output
| Field1 | Field2 |
|---|---|
| abc_id_test_scenario | cde test |
If field 2 contains string that matches with field 1 then I need to filter those records.