Add a few lines of code to detect a value change in sensor greater then x in y (milli)seconds. If that happens, issue warning that something is fishy. Repeat at each value change. After that switch over to next available device. If none available inform crew and disconnect all dependant systems.
It would need to be a lot more nuanced than that! You wouldn't want to fly over some of those mountains that have steep enough sides for base jumpers to leap off them and have your radio altimeters all decide they have failed at the same time just because the top of the cliff is 3,000' closer to the plane than the bottom of the cliff...