The only chm to epub conversion that makes sense, is export of publications saved in Microsoft's compiled CHM format to standard EPUB format. This is often the case for various manuals or technical publications previously saved as .chm files, to make them available in a modern, ebook format.
Tools such as the HelpNDoc are most likely your best option for this, but it is likely that other alternatives exist as well.