Brake light comes on and then goes off

Hello I have a 98 honda civic and for last few days when I start driving the brake light comes on and will stay on until I reach the top gear and then it goes off. No problems in driving i.e. it stops fine when I brake.

Any suggesstions on how to check/fix it or taking ot the mechanic is the only option?

I sure that if you consult your owner’s manual it will tell you that the light indicates a low brake fluid level.
If you check and find that the level is low, you can add some brake fluid, but you will also need to get the brake system checked. It is probably low because the brake pads have worn down. They may be worn enough to need to be replaced.