I would think carefully if that is really what you want to do and its
implications, such design can't really be implemented.
Remember, REAL hardware doesn't have a 'x' state, a bit will be 0, or 1,
or perhaps Z if you are at a point which can be put into high impedance.
X represents a condition where we don't really know the state of the signal.
You could perhaps add logic so that if D0 and D1 are the same, then if
S=x you output that value, but forcing the output to be D0 when S=x will
make the simulation 'inaccurate' if you really want to see what would
happen in this case in actual hardware.