  We demonstrate a versatile, rotational-state dependent trapping scheme for
the ground and first excited rotational states of $^{23}$Na$^{40}$K molecules.
Close to the rotational manifold of a narrow electronic transition, we
determine tune-out frequencies where the polarizability of one state vanishes
while the other remains finite, and a magic frequency where both states
experience equal polarizability. The proximity of these frequencies of only 10
GHz allows for dynamic switching between different trap configurations in a
single experiment, while still maintaining sufficiently low scattering rates.
