title: Concatenation with case statement in mysql
body: <p>I want to generate .sql file with the sql query output . I am doing this with concat statement in sql . I am using case statement in  some queries this will be the problem for me.</p>
  
  <pre><code>select concat('insert into x values(',CASE a when B then 'Book' else 'NONE' end , ') on duplicate key update B = values(B)') from author;
  
  select 'insert into x values('+CASE a when B then 'Book' else 'NONE' end +') on duplicate key update B = values(B)' from author;
  </code></pre>
  
  <p>It also not works because in mysql + used for adding only numbers not for strings . </p>
  
  <p>Is there any way for doing this?. </p>