**Describe the situation**
multiIf works 10 times slower than If with single condition.

**How to reproduce**
ClickHouse version 21.10

```

SELECT count()
FROM numbers_mt(1000000000)
WHERE NOT ignore(multiIf(number = 0, NULL, toNullable(number)))

┌────count()─┐
│ 1000000000 │
└────────────┘

1 rows in set. Elapsed: 10.267 sec. Processed 1.00 billion rows, 8.00 GB (97.41 million rows/s., 779.25 MB/s.)

SELECT count()
FROM numbers_mt(1000000000)
WHERE NOT ignore(If(number = 0, NULL, toNullable(number)))

┌────count()─┐
│ 1000000000 │
└────────────┘

1 rows in set. Elapsed: 1.010 sec. Processed 1.00 billion rows, 8.00 GB (990.63 million rows/s., 7.93 GB/s.)
```

**Expected performance**
The same performance for multiIf and if.

optimizeGroupBy(select_query, context);
    
    if (settings.optimize_group_by_function_keys)
        optimizeGroupByFunctionKeys(select_query);
    
    if (settings.optimize_move_functions_out_of_any)
        optimizeAnyFunctions(query);
    if (settings.optimize_normalize_count_variants)
        optimizeCountConstantAndSumOne(query);
    if (settings.optimize_rewrite_sum_if_to_count_if)
        optimizeSumIfFunctions(query);
    
    if (settings.optimize_injective_functions_inside_uniq)
        optimizeInjectiveFunctionsInsideUniq(query, context);
    
    if (settings.optimize_aggregators_of_group_by_keys
        && !select_query->group_by_with_totals
        && !select_query->group_by_with_rollup
        && !select_query->group_by_with_cube)
    {
        optimizeAggregateFunctionsOfGroupByKeys(select_query, query);
    }
    
    if (settings.optimize_duplicate_order_by_and_distinct)
    {
        optimizeDuplicateOrderBy(query, context);
        
        
        if (!settings.distributed_group_by_no_merge)
            optimizeDuplicateDistinct(*select_query);