MySQL LIKE IN with Input Parameter of stored procedure Comma Separated Values I am creating a stored procedure to search user's Towns. 
From the User Interface user will select multiple towns that will be sent to the stored procedure.
Sample input of the towns parameter for the stored procedure would be like orangi,faisal,nazimabad. 

Towns that are stored in the table are


Orangi
Korangi
Shah Faisal
Shahrah-e-Faisal
Nazimabad
North Nazimabad


Now I want to select all those above records against that input. That is I want to use LIKE operator with IN from a stored procedure's parameter.

I don't know how many towns would be there in the input.
it could be just one, or two or three or all these mentioned above.

I want to search all the towns against that query

Sample Stored Procedure is

CREATE PROCEDURE `GetUsersByTown`(
IN `SearchTowns` VARCHAR(200) -- `ORANGI,FAISAL,NAZIMABAD`
)
BEGIN
      SELECT
      name,
      Town,
      FROM userLocation where Town in (SearchTowns)
END


Expected Outcome


Name ---  Town
Hamza --- Orangi 
Jamal --- Korangi 
Hasham --- Shah Faisal 
Aliyan --- Shahrah-e-Faisal
Danish --- Nazimabad
Farrukh --- North Nazimabad


I have tried to use find_in_set() but FIND_IN_SET does not accept wildcards like % and it doesn't use index?

I have also looked at using REGEXP  ValueA|ValueB but I don't know how to put the input parameter that is comma separated values in that REGEXP
Use REPLACE(SearchTowns, ',', '|') to change commas to pipes.
Put that result in, say, @regexp.
Construct, via CONCAT a single SELECT with 

SET @sql = CONCAT('SELECT
  name,
  Town,
  FROM userLocation where Town REGEXP "', @regexp, '"');

PREPARE and EXECUTE the query.


That query should look like:

SELECT
      name,
      Town,
      FROM userLocation where Town REGEXP "orangi|faisal|nazimabad"


(You could manually run that to verify that the correct rows are delivered.)

Also, be sure to have case-folding COLLATION, such as utf8mb4_unicode_520_ci for Town.  (That is indicated by the trailing _ci.)

Code

DELIMITER //
CREATE PROCEDURE `GetUsersByTown`(
    IN `SearchTowns` VARCHAR(200) -- `ORANGI,FAISAL,NAZIMABAD`
)
BEGIN
IF (SearchTowns IS NULL) THEN
    SELECT name, Town
        FROM userLocation;
ELSE
    SET @towns = REPLACE(SearchTowns, ',', '|');
    SELECT name, Town
        FROM userLocation
        WHERE Town REGEXP (@towns);
END IF;
END //
DELIMITER ;