 <p>Try to modify :</p> <pre><code>CASE WHEN ID = 'test' THEN ROLENAME END </code></pre> <p>into :</p> <pre><code>CASE WHEN ID = 'test' THEN ROLENAME END AS ROLENAME </code></pre> <p>The reason is because when you use CASE clause, it will have no name, unless you define it</p>