Technically, there is no "OTG cables". There are cables with "micro-A" to Type-B plug, and "micro-B" to Type-A plugs. The only "OTG cable" is the one with "micro-A" on one end, and "micro-B" on another. But there are "OTG devices". In most industry-accepted simplistic variant of OTG the functional role of OTG device is defined by the status of fifth pin in micro connectors, so-called ID pin.
A USB compliant "OTG device" must have so-called "micro-AB" receptacle. This receptacle can accommodate both types of "micro" plugs, the half-rounded "micro-B", and the squarish "micro-A".
For a OTG gadget to be a device, it has to be plugged with "micro-B" plug, and the other end (standard Type-A plug) goes into PC host port. In "micro-B" plug, the ID pin is floating, connected nowhere. The OTG system detects this and configures itself as a device, MTV/PTP, or mass storage. Then it will see VBUS=5V and will attempt to connect to PC host as a device.
For the OTG gadget to become a USB host, a "micro-A" type of plug is required, where the ID pin is grounded. The gadget detects the grounded pin, and configures itself as USB host. In this role the gadget must source the VBUS with power sufficient for external USB devices to operate. This power comes from the gadget's internal battery, and therefore has a limited resource.
Now, not all portable devices want users to drain their batteries with external mass storage devices. So phone manufacturers use only "micro-B" (half-rounded) type of receptacles on their gadgets. Therefore, formally, this kind of devices are not meant to use as hosts, because the "micro-B" receptacle can't accommodate squarish "micro-A" plug.
However, the micro-B port is still frequently designed for diagnostic, debugging, and firmware upgrade means. In many cases the port can be used in host mode, with a hub attached to it, with a keyboard and mouse to control UEFI/BIOS, and with a flash drive that might contain new system image. But this is not for ordinary user.
To maintain the host functionality, Asian industry invented a formally-illegal "OTG adapter". This is a short cable with micro-B plug on one end, and Type-A receptacle on the other. However, unlike the normal micro-B plug, this "adapter" has the ID pin grounded in the cable overmold. In this case this adapter makes the gadget to change its role to HOST mode, and the Type-A end acts as a PC host, sourcing VBUS. As result, a flash drive can be connected, and the gadget should recognize it.
Now, to answer the question which cable works as role changing, and which does not, you need to check the status of ID pin in the connector somehow.
Alternatively you can take a cable with the squarish micro-A type plug, and file off two corners of the metal shroud, to make it into micro-B shape, so it will fit into micro-B receptacle.