Compare storage with hand item

I only want to run a certain command when the data in a storage matches with the item currently held by a player. Is this possible in any way shape or form :)
Continue to help post