SQL> with t as
2 (
3 select 'a_b' str from dual
4 union all
5 select 'acb' str from dual
6 union all
7 select 'a%b' str from dual
8 union all
9 select 'a''b' str from dual
10 union all
11 select '%' str from dual
12 union all
13 select '_' str from dual
14 union all
15 select '123' str from dual
16 )
17 select str
18 from t
19 where str like '%a_b%'
20 /
STR
---
a_b
acb
a%b
a'b
SQL>
SQL> with t as
2 (
3 select 'a_b' str from dual
4 union all
5 select 'acb' str from dual
6 union all
7 select 'a%b' str from dual
8 union all
9 select 'a''b' str from dual
10 union all
11 select '%' str from dual
12 union all
13 select '_' str from dual
14 union all
15 select '123' str from dual
16 )
17 select str
18 from t
19 where str like '%a\_b%' escape '\'
20 /
STR
---
a_b
SQL>