MYSQL - Optimizing MAX(CASE WHEN ...)
For the simple queries (without GROUOP BY), you can rewrite them as:

SELECT version 
FROM versions 
-- WHERE important = 1
ORDER BY version DESC
LIMIT 1 ;


and check if the execution plan does not do a table scan and using the index in the way that you expect. 

Additionally, you can add an index on (important, version).



For the GROUP BY type queries, an index on (important, type, version) would fit better. 

Rewriting that query with LIMIT 1 is not trivial as we want many maximum (one for each type). But if the index alone doesn't improve things much, here is a different query that will use the above composite index.

Performance is usually improved with this method when there are few distinct type values:

SELECT dt.type, v.version 
FROM 
    ( SELECT type 
      FROM versions 
      WHERE important = 1
      GROUP BY type
    ) AS dt
  -- LEFT
  JOIN versions AS v
  ON  v.important = 1
  AND v.type = dt.type 
  AND v.version = ( SELECT vi.version
                    FROM versions AS vi
                    WHERE vi.important = 1
                      AND vi.type = dt.type
                    ORDER BY vi.version DESC
                    LIMIT 1 
                  ) ;


There are variations you could try. For example, removing the important = 1  (only from inside the derived table dt) and using LEFT JOIN there. This would give you all types (and NULL values for the types that have no version marked as "important".

If you have a separate table, with all the types (i.e. PRIMARY KEY (type)), you could completely replace the dt with that table.