You have to use the logistic sigmoid activation function in the output layer when using ANN (Artificial Neural Network) for classification. Then, the output values can be interpreted as probabilities.
So, if you doing for 2-class classification, you train using 1-of-C encoding, where 2 ANN outputs will have training values as (1,0) and (0,1) for the classes respectively.
To get the probability of first-class in percent, just multiply the first ANN output by 100. To get the probability of another class, use the second output.
For multi-class classification, use the softmax activation function.
To learn Artificial Neural Networks and implementing them using TensorFlow, then check out this AI Course by Intellipaat.