We address the problem of computing the interference-plus-noise covariance matrix from a sparsely located demodulation reference signal (DMRS) for spatial domain interference whitening (IW). The IW procedure is critical at the user equipment (UE) to mitigate the co-channel interference in 5G new radio (NR) systems. A supervised learning based algorithm is proposed to compute the covariance matrix with goals of minimizing both the block-error rate (BLER) and the whitening complexity. A single neural network is trained to select an IW option for covariance computation in various interference scenarios consisting of different interference occupancy, signal-to-interference ratio, signal-to-noise ratio, modulation order, coding rate, etc. In interference-dominant scenarios, the proposed algorithm computes the covariance matrix using DMRS in one resource block (RB) due to the frequency selectivity of the interference channel. On the other hand, in noise-dominant scenarios, the covariance matrix is computed from DMRS in entire signal bandwidth. Further, the proposed algorithm approximates the covariance matrix into a diagonal matrix when the spatial correlation of interference-plus-noise is low. This approximation reduces the complexity of whitening from $\mathcal{O}(N^3)$ to $\mathcal{O}(N)$ where $N$ is the number of receiver antennas. Results show that the selection algorithm can minimize the BLER under both trained as well as untrained interference scenarios.