How do I insert a table name into a mysql query with ExpressJs?

I’m trying to use this to get contents of a specific table:

let tablename = req.body.login
connection.query('SELECT * FROM ?', tablename, (err, rows) => {
    if (err) throw err
    res.send(rows)
})

But due to tablename being a string, it gets inserted into the query with quotes, resulting in an error. If this can’t work, how can I structure my database to be able to add users and more data to any chosen one?