There`s no way to hide the comment if you`ve commented.
You can only delete it.
if you`re interested in hiding the comment appearing on your profile so your Facebook friends do not see it,
then there is a way!
Go to your profile and where you see the story that says you`ve commented on that particular photo,
next to it there should be a button that says "remove".
Clicking that will pop up a box which asks you to confirm removal and you click yes.
your friends cannot see you`ve commented now :)