In Explanation of Wine, and the Threat to him who Drinks it - Section 3 Mishkat al-Masabih 3660

Arabic hadith text
وَعَنْ أَبِي مُوسَى أَنَّهُ كَانَ يَقُولُ: مَا أُبالي شرِبتُ الخمرَ أَو عبدْتُ هذهِ السَّارِيةَ دونَ اللَّهِ. رَوَاهُ النَّسَائِيّ
Translation
Abu Musa used to say

It is all the same to me whether I drink wine or worship this pillar instead of God.*Nasa’i transmitted it.*He says that the one sin is as serious as the other.