Prediction in MNIST dataset

So I finished the 1st lesson and I tried to run the data on MNIST dataset.
In the video with cats vs dogs, there were 2 possible outputs so the value was scaled between 0 to 1 by my understanding, how can the output data be transformed into sat 0 to 9 with values close to “2” would mean that the NN predicted the label as “2”.