Hi sureshMGR,
This is case-insensitive issue in the query.
So use UPPER function to convert the strings to upper case before comparing.
Refer below modified query.
SQL
SELECT ImageFilePath FROM RibbonImage WHERE ImageFilePath IS NOT NULL AND UPPER(ImageFilePath) LIKE UPPER('%1M%')
UNION ALL
SELECT ImageFilePath FROM RibbonImage WHERE ImageFilePath IS NOT NULL AND UPPER(ImageFilePath) LIKE UPPER('%1W%') LIMIT 2;