title: To return STRING type using MYSQL function
body: <p>I want to return a string using mysql function.
  Code is given below. I gets only boolean 1 or 0 output.</p>
  
  <p>here </p>
  
  <blockquote>
    <p>specification_value</p>
  </blockquote>
  
  <p>is string type</p>
  
  <pre><code>CREATE DEFINER=`ranju`@`%` FUNCTION `get_fuel_name`(v_id INT) RETURNS varchar(100) CHARSET latin1
      READS SQL DATA
  BEGIN
      RETURN EXISTS (SELECT  `specification_value` FROM  `vehicle_specifications` WHERE  `specification_id` =1 AND `vehicle_id` =v_id LIMIT 1);
  END
  </code></pre>
  
  <p>Please find a solution</p>