title: Can we set a tablename by checking a if else condition in SQL and as well as HQL?
body: <p>I have to set a particular table name(consider multiple tables) by checking a column in table1 where there will be a String which can be mapped to any of that multiple tables. So if the String is matching a name then set or check a if else statement to set a particular table name.</p>
  
  <p>In simple language  </p>
  
  <pre><code>select tableNAme.name  
  from yert  
  if  (yert.name = 'hello' then set tableName = 'hello_table')  
  else (yert.name = 'hi' then set tableName = 'hi_table')
  </code></pre>