one reason could be that you are not pressing the string hard and taking too much delay in lifting up the fingure. Another could be that you are pressing very near to the fret bar.
Try to press the note at the middle of the fret so that equally distance from left and right fret bars. Press it hard and lift vertical you figure as quickly as possible. If lifting is not vertical to the string then it will be in touch with the string for longer time and will give you noise.