title: Node JS Sequelize WHERE LIKE operator in raw query is throwing error
body: <p>I am building a Node JS application. I am using Sequelize for the database operations. Now, I am having a problem with using the LIKE operator with raw queries.</p>
  <p>I have the query as follow.</p>
  <pre><code>let offset = (page &gt; 1)? (page - 1) * recordPerPage: 0;
      let where = { }
      let sql = 'SELECT &quot;Users&quot;.&quot;id&quot;, &quot;Users&quot;.&quot;name&quot;, &quot;Users&quot;.&quot;email&quot;';
      sql = sql + ' FROM &quot;Users&quot;';
      sql = sql + ' WHERE &quot;Users&quot;.&quot;id&quot; != :myUserId';
      where.myUserId = myUserId;
      if (keyword) {
        where.keyword = keyword;
        sql = sql + ' AND (&quot;Users&quot;.&quot;email&quot; LIKE &quot;%:keyword%&quot; OR &quot;Users&quot;.&quot;name&quot; LIKE &quot;%:keyword%&quot;)'
      }
      if (parseInt(roleType) &gt; 0) {
        // get the role is because role is the type
        let role = await Role.findOne({
          where: {
            type: {
              [Op.eq]: roleType
            }
          }
        })
        where.role = role.id;
        sql = sql + ' AND &quot;Users&quot;.&quot;id&quot; IN (SELECT &quot;UserRoles&quot;.&quot;user_id&quot; FROM &quot;UserRoles&quot; WHERE &quot;UserRoles&quot;.&quot;role_id&quot; =:role)';
      }
      sql = sql + ' ORDER BY &quot;Users&quot;.&quot;name&quot; ASC, &quot;Users&quot;.&quot;id&quot; ASC';
  
      where.offset = offset;
      where.limit = recordPerPage;
      sql = sql + ' LIMIT :limit OFFSET :offset';
  
      let users = await database.sequelize.query(sql, {
        replacements: where,
        type: QueryTypes.SELECT
      })
  </code></pre>
  <p>When I pass the keyword that is used with the LIKE operator, I am getting the following error.</p>
  <pre><code>`column &quot;%'TEST'%&quot; does not exist`
  </code></pre>
  <p>What is wrong with my code and how can I fix it?</p>