Table:
0
A
B
C
D
E
1
Team 1
Agg.
Team 2
1st leg
2nd leg
2
AEK Larnaca
1–3
APOP Kinyras
0–2
1–1
3
Omonia
5–2
Digenis Morphou
3–1
2–1
4
AE Paphos
1–3
AEL Limassol
0–1
1–2
5
Ermis Aradippou
7–2
THOI Lakatamia
3–1
4–1
6
APOEL
5–4
Doxa Katokopias
2–2
3–2
7
Ethnikos Assia
2–8
Ethnikos Achna
1–5
1–3
8
Atromitos Yeroskipou
0–3
Enosis Neon Paralimni
0–0
0–3
9
Anorthosis
3–4
Apollon
2–1
1–3 ( aet )

Questions and formulas:
Question: What was the 1st leg when team 1 was apoel?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,A1="apoel"),4))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,A2:A9="apoel"),4))
Level: medium
Question: What was team 2 when team 1 was omonia?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,A1="omonia"),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,A2:A9="omonia"),3))
Level: medium