Case condition in the HTML template

I went through this post but it was not helpful. Following is my code in HTML (which is not working) which are implemented using nested if-else. How can do the same using the Case Statement?

          <%= if @job_opening.state != :archive do %>
            <a class="dropdown-item" href="#" phx-click="archive" phx-value="<%= @job_opening.id %>">Archive</a>
          <% else %>
            <%= if @job_opening.state != :archive %>
            <a class="dropdown-item" href="#" phx-click="unarchive" phx-value="<%= @job_opening.id %>">Unarchive</a>
            <% else %>
              <%= if @job_opening.state == :public %>
                <a class="dropdown-item" href="#" phx-click="private" phx-value="<%= @job_opening.id %>">Private</a>
              <% else %>
                <a class="dropdown-item" href="#" phx-click="public" phx-value="<%= @job_opening.id %>">Public</a>
              <% end %>  
            <% end %>
          <% end %>
1 Like
<%= case expr do %>
  <% pattern -> %>A
  <% pattern -> %>B
<% end%>
18 Likes