using System;
public class Program
{
public static void Main()
test(0);
test(1);
test(2);
test(3);
}
static void test(int val) {
var res = (val == 1 ? 0 : val) switch {
0 => A(), // 0 or 1
2 => B(), // 2
_ => throw new Exception()
};
Console.WriteLine("{0}: {1}", val, res);
static string A() { return "A"; }
static string B() { return "B"; }