https://www.adac.de/verkehr/tanken-k...bilanz-studie/
The test is in German, so some highlights...
The test was done using the so-called Golf-class, using the car for 15 yrs and 15k kms/10K miles annually. The CNG car was obviously the cleanest. But not many cars use CNG (well, here in the Netherlands a lot of city council cars do, actually).
More interesting is the Electric vs Diesel and Fuel...
The electric car is cleaner than ordinary fuel but only
after 8,5 yrs/127,500 km
The electric car is cleaner than a diesel car but only
after... 14,6 yrs and 219,000 km!
It all has to do with the not-so-clean production of batteries and the fact that not all electric power plants are 'green'.