Case e ERb

Scritto così funziona

<% case test
when ‘a’ %>
<% puts ‘a’ %>
<% when ‘b’ %>
<% puts ‘b’ %>
<% else %>
<% puts ‘c’ %>
<% end %>

Mi aspettavo che funzionasse anche così
<% case test %>
<% when ‘a’ %>
<% puts ‘a’ %>
<% when ‘b’ %>
<% puts ‘b’ %>
<% else %>
<% puts ‘c’ %>
<% end %>

ma si ha errore di sintassi in
<% case test %>

Vi è un motivo ?
Ciao a tutti