About a barcode

I actually want to ask how can I assign an actual price to a barcode in a way that when you scan a barcode it shows the actual price assigned.