In OpenFlow networks, switches accept the flow rules through standard interfaces, and perform flow-based packet processing. To facilitate the OpenFlow table lookup, TCAM has been widely used in OpenFlow switches. However, TCAM is expensive compared with SRAM. In this paper, a cost-effective lookup scheme combining hash table with TCAM is proposed for flow table matching. By theoretical analysis and extensive experiments, capacity configurations of hash table and TCAM are obtained at the optimized cost of flow table lookup. The experiment results show that the proposed lookup scheme can save over 80% cost compared with the pure TCAM scheme while keeping the similar lookup performance.