'Elasticsearch SQL query issue with 'CASE WHEN' using with 'WHERE IN'

I am trying to execute this query

 SELECT 
     id, 
     CASE 
         WHEN name LIKE 'John' THEN name 
     END AS name 
 FROM 
     Employee 
 WHERE 
     id IN ('1', '2', '3')

but I am getting an error:

details: "Failed to parse operator [LIKE]"
reason: "Invalid SQL query"
type: "SqlParseException"

However I am getting proper response for these queries,

SELECT
    id, 
    CASE WHEN name LIKE 'John' THEN name END AS name 
FROM
    Employee

or

SELECT id 
FROM Employee 
WHERE id IN ('1', '2', '3')

Any suggestions?

Thanks, Sumesh



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source