The formula that can tell you the sheet name is REFERENCE.NAME . It will give the full reference to a cell as text as in January::Table 1::A1. You can parse the string using the LEFT function to get just the sheet name. If your sheets are month names, you can use MONTH to turn the name into a number. As an example, I have a table named "Table 1" on a sheet named "January" and in cell B2 I have this formula to get me the month number:
=MONTH(LEFT(REFERENCE.NAME(A1,2),FIND(":",REFERENCE.NAME(A1,2))−1))
You can use that number with the INDEX function to access your "database". I have a sheet named "Database" with a table named "Table 1" that has five columns (A:E) and one header row. Because of the one header row, January is in row 2. The formula I would use to access the data in column 1 for the month is:
=INDEX(Database::Table 1::$A:$E,$B2+1,1)
To access the next column you change the final 1 to a 2, and so on. You can use the COLUMN function to advance the number vs hardcoding 1,2,3 etc. into the formula. If my formula was in cell C2 (column #3) the formula would be
=INDEX(Database::Table 1::$A:$E,$B2+1,COLUMN()-2)
This formula can be filled to the right to get the data from the other columns of data.