If a given fuel source were free, that is the one you would use. Since none are you have to find the breakeven between various sources.
First, what is the costs of various fuels? Call your electric utility and ask for someone in the rate department. Most front end clerks don’t have a clue about rates. Are time-of-use rates available? I am on Progress Energy’s RTOUD rate in Asheville, NC. Off-peak electricity is only $0.04/kWh. I abandoned an Apollo natural gas water heater in favor of a Marathon (105 gallon) electric. I heat off-peak only. For a tankless gas (95% eff), I would have to buy natural gas at $1.11/therm or propane at $1.02/gallon to equal the price of $0.04/kWh electricity. For the last 12 months, nat gas has varied between $1.27 (summer) and $1.84 (winter) while propane is running $2 to $3/gallon. Last winter, I used a lot of off-peak electricity so that the average price for January was less than $0.049/kWh.
Since this is really economics and not water heaters, I won’t tie up this site further. Feel free to contact me at firstname.lastname@example.org.