Better way of doing something based on what is selected

Is there a better way of doing the following? This is what I’ve come up with so far and there has to be a better method:

for _, textBoxTable in PropertiesBarListTextBoxesTable do

	textBoxTable.TextBoxInstance.FocusLost:Connect(function(EnterPressed)

		if EnterPressed == true then

			if PropertiesBarListTextBoxesTable.XposTextBox == textBoxTable then

				-- do something #1

				return
			end

			if PropertiesBarListTextBoxesTable.YposTextBox == textBoxTable then

				-- do something #2

				return
			end

			if PropertiesBarListTextBoxesTable.ZposTextBox == textBoxTable then

				-- do something #3

				return
			end

			if PropertiesBarListTextBoxesTable.XrotTextBox == textBoxTable then

				-- do something #4

				return
			end

			if PropertiesBarListTextBoxesTable.YrotTextBox == textBoxTable then

				-- do something #5

				return
			end

			if PropertiesBarListTextBoxesTable.ZrotTextBox == textBoxTable then

				-- do something #6

				return
			end

		end

		print("don't do anything, revert to what it started as") 

	end)

end

Here’s the table:

Thanks!