You can't have a transaction without mining. Mining is the work done to solve a batch of transactions, so the exact cost of a transaction is easy to determine provided that you don't include the cost of plant (buildings and IT to run the miners, though this is usually very minor compared to the actual calculation consumption). Each block contains (typically) between 3000 and 4000 transactions and is solved every 10 minutes. As of today, it takes 2.6GWh to solve a block, given the current number of miners (137TWh/yr per https://digiconomist.net/bitcoin-energy-consumption), which is 744kWh per transaction at 3500 transactions per block.
The cost of a Visa transaction is more difficult because there are people involved and other plant costs (buildings to house the people who work for Visa). The actual cost to process a Visa transaction, in direct transactional power usage, is trivial because a Raspberry Pi can "process" hundreds of thousands of transactions a second locally - it's literally a couple hundred bytes of login/query/reply data, and adding or subtracting from a ledger which is mirrored to distributed servers. Distributed across a server with enough transactions to keep it busy it's probably a few hundred milliseconds on 1/8 of a 50W processor - call it 0.001Wh at the server, which is the equivalent of the 700kWh per bitcoin transaction. If we say that there are 10 machines all doing the same virtual transaction on each physical transaction (incl. POS, backup, billing, etc) and we figure a 5:1 cost of total power (a/c, losses, memory, storage) then we're all the way up to 0.00005kWh (0.05 Wh, or 180 watt-seconds) per transaction. That means that the overall cost for visa to process your charge is 1.5kWh/0.00005kWh for the computers or 30,000:1 due to humans being involved in the process.
Here's the thing, though: Bitcoin gets harder (more compute intensive) as time goes on, and the rate of increase is faster than the ability to solve, on a Wh basis. IE - Bitcoin transactions will get more expensive over time unless bitcoin changes their code - and there is always resistance to that because there is a financial disincentive to reduce the work in Proof of Work systems. This is mitigated on other blockchains by using Proof of Stake, but that has other implications. Visa, otoh, is taking advantage of AI and drops in processor and storage costs to lower their per-transaction cost because there is a financial incentive to reduce processing costs as the fees charged are fixed (nominally 3% of the transaction cost) and anything left over is profit.