Light does not stay on all the time.
My ABS light is coming on. Brakes seem to be okay. on 1998 Mazda B2500
To diagnose properly need a trouble code. Unfortunately you can't go to a parts house to get that code/codes.
You probably have an abs sensor ring with a crack in it. Rust forms on the ends of the half-shafts and causes these to crack and need to be replaced. When the crack is not spreading the ring too far you can get an intermittant signal.