Switch to select optimization for two-case switches