Referencing file name in the formula column

Is there a way to write a formula that queries the name of a file in the file column?

Here’s what I’m trying to do:

IF(AND({Name} = {guid},SEARCH({Name}, {File}, 1) > 0), “:green_circle:”, “:red_circle:”)

name,guid,file
dog,dog,dog.jpg
cat,cat,bird.jpg

The first row would return :green_circle:; the second should give :red_circle:.