Maikinos try this code:
<#assign userStar = rest("2.0","/search?q=" + "SELECT * FROM roles WHERE users.id = '${user.id}'"?url) />
<#list userStar.data.items as role >
<p>${role.name}</p>
<#switch role.name>
<#case 'Nivel_Test1'>
<div class="banner_cr"><img src="
${asset.get("/html/assets/imagen.jpg")}" /></div>
<#break>
<#case 'Nivel_Test2'>
<div class="banner_cr"><img src="
${asset.get("/html/assets/imagen.jpg")}" /></div>
<#break>
<#case 'Nivel_Test3'>
<div class="banner_cr"><img src="
${asset.get("/html/assets/imagen.jpg")}" /></div>
<#break>
<#case 'Administrator'>
<div class="banner_cr">Welcome Administrator!</div>
<#break>
<#default>
<div></div>
</#switch>
</#list>
You can remove this line, it was just for debugging purpose:
<p>${role.name}</p>
And this line too, it's just because I don't have your roles:
<#case 'Administrator'>
<div class="banner_cr">Welcome Administrator!</div>
<#break>