I want to make a table like the following.

In particularly what does not satisfy me is that I wanted to incorporate \multirow so that `cell1,cell2,cell9,cell10' can be centered in between the merged rows....Is there anyway to fix it?
Below is my current Latex code.
\begin{center}
\begin{tabular}{ |c|c|c|c|c| }
\hline
& $\Omega\in\mathscr{P}_k, f_0 \in \mathcal{P}_{m_{f_0}}$ & $\Omega\in\mathscr{P}_k,f_0\in \mathcal{C}(\Gamma)$ & $\Omega \in \mathscr{C}, f_0 \in \mathcal{P}_{m_{f_0}}$ & $\Omega\in \mathscr{C}, f_0 \in \mathcal{C}(\Gamma)$\\
\hline
$d=2$ & cell 1 & cell2 & cell3 & cell4\\
\cline{1-1}
\cline{4-5}
$d=3$ & cell 1 & cell2 & cell5 & cell6\\
\hline
$d=4$ & cell7 & cell8 & cell9 & cell10\\
\cline{1-3}
$d\geq 5$ & cell11 & cell12 & cell9 & cell10\\
\hline
\end{tabular}
\end{center}
\multirow, see e.g. How to merge cells vertically – Torbjørn T. Jul 16 '15 at 20:09